#include "src/test_scheme.h"
#include "src/examples.h"

void TestBGV(params param);

int main()
{

    //测试用例
    Examples::TestPolyMult();

    Examples::TestRotate();
    

    // 测试基本算子
    params param = params::logN15QP881;
    TestBGV(param);

    return 0;
}



void TestBGV(params param)
{
    long logN;// N的长度
    long qCount;// 模数Q的个数
    long pCount; // 模数P的个数
    long tCount; // 模数T的个数
    long logScale;// 缩放因子的精度
    int gamma;// 切片数
    long logSlots;// 槽的数
    switch (param) {
        case params::logN15QP881:
            logN = 15;
            qCount = 15;
            pCount = 1;
            tCount = 1;
            logSlots = 14;
            break;
        case params::logN12QP884:
            logN = 12;
            qCount = 12;
            pCount = 3;
            tCount = 1;
            logSlots = 11;
            break;
    }
    TestScheme::TestEncodeEncryptDecryptDecode(logN, qCount, pCount, tCount, logSlots);

    TestScheme::TestMulCtCtWithReli(logN, qCount, pCount, tCount, logSlots);

    TestScheme::TestRotateBatch(logN, qCount, pCount, tCount, 16128, logSlots, true);

    TestScheme::TestRotateBatch(logN, qCount, pCount, tCount, 256, logSlots, false);


}

